<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
home
<form action="web/page/consumes.do" method="post" enctype="text/plain">
    <textarea name="name" id="" rows="10" cols="30">

    </textarea>
    <button>提交</button>
</form>

<hr>

<button onclick="movie()">axios = > movie 1</button>
<button onclick="movie1()">axios = > movie 2</button>
<button onclick="movie2()">axios = > movie 3</button>
<script>
    function movie() {
        let m = {
            id : 123,
            name : 'abc',
            plans:[
                {id:456,name:"ert"},
                {id:789,name:"aaa"},
            ]
        }
        axios.get("web/page/movie",{
            params : m
        }).then(res=>{
            console.info(res.data);
        })
    }

    function movie1(){
        let p = new URLSearchParams();
        p.append("id",123);
        p.append("name","abc");
        p.append("plans[0].id",456);
        p.append("plans[0].name","aaa");
        p.append("plans[1].id",789);
        p.append("plans[1].name","b");
        axios.post("web/page/movie",p).then(res=>{
            console.info(res.data);
        })
    }

    function movie2(){
        let m = {
            id : 123,
            name : 'abc',
            plans:[
                {id:456,name:"ert"},
                {id:789,name:"aaa"},
            ]
        }
        axios.post("web/page/movie2",m).then(res=>{
            console.info(res.data);
        })
    }
</script>
</body>
</html>